<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!-- ::link, ::style, ::script-->
<head th:replace="fragment :: common_head(~{::meta},~{::title},~{},~{},~{::script})">
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>1. function</title>
    <script>
        window.onload = function() {
            // 1. 默认参数
            function fn1(x, y=10) {
                console.log(x, y);
            }

            fn1(); // undefined 10
            fn1(1); // 1 10
            fn1(1,2); // 1 2
        };
    </script>
</head>
<body>
<header id="header" th:replace="fragment :: header"></header>

<footer id="footer" th:replace="fragment :: footer"></footer>
</body>
</html>
